﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace Clinica_Frba.Listados_Estadisticos
{
    abstract class Query
    {
        public string QueryName { get; set; }
        public string QueryId { get; set; }
        public string SqlQuerySemestre1 { get; set; }
        public string SqlQuerySemestre2 { get; set; }

        public Query(string QueryName, string SqlQuerySemestre1, string SqlQuerySemestre2)
        {
            this.QueryId = this.GetType().ToString();
            this.QueryName = QueryName;
            this.SqlQuerySemestre1 = SqlQuerySemestre1;
            this.SqlQuerySemestre2 = SqlQuerySemestre2;
        }

        virtual public String SqlQuery(int semestre, int year)
        {
            if (semestre == 1)
            {
                return SqlQuerySemestre1;
            }
            else
            {
                return SqlQuerySemestre2;
            }
        }

    }
}
